//
//  GDMineQuiteCell.m
//  爱新奇－味道
//
//  Created by 热带雨林 on 17/2/20.
//  Copyright © 2017年 热带雨林. All rights reserved.
//

#import "GDMineQuiteCell.h"
#import "CZAdditions.h"
#import "Masonry.h"

@implementation GDMineQuiteCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        [self setupUI];
    }
    
    return self;
}

- (void)setupUI{
    
    UIButton *button = [UIButton cz_textButton:@"退出当前用户" fontSize:14 normalColor:[UIColor redColor] selectedColor:[UIColor redColor]];
    
    [self.contentView addSubview:button];
    
    [button addTarget:self action:@selector(clickButton) forControlEvents:UIControlEventTouchUpInside];
    
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.centerY.equalTo(self.contentView);
        
        make.size.equalTo(self.contentView);
    }];
}
- (void)clickButton{
    UIAlertView *alterView = [[UIAlertView alloc]initWithTitle:@"退出信息" message:@"亲，真的要退出吗？" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
    
    [alterView show];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
